<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			// 当页面加载完了之后执行onload事件
			window.onload = function() {
				var innerHtmlDiv = document.getElementById('innerHtmlDiv');
				var innerTextDiv = document.getElementById('innerTextDiv');
				innerHtmlDiv.innerHTML = '<span style="color: red;">innerHtml</span>';
				innerTextDiv.innerText = '<span  style="color: red;">innerText</span>';
			}
		</script>
		
	</head>
	<body>
		<div id="innerHtmlDiv"></div>
		<div id="innerTextDiv"></div>
		
		<!-- <script type="text/javascript">
			var innerHtmlDiv = document.getElementById('innerHtmlDiv');
			var innerTextDiv = document.getElementById('innerTextDiv');
			innerHtmlDiv.innerHTML = '<span style="color: red;">innerHtml</span>';
			innerTextDiv.innerText = '<span  style="color: red;">innerText</span>';
		</script> -->
	</body>
</html>
